<!--
 * @Description: BOM  
 * @Author: rendc
 * @Date: 2022-09-05 15:20:56
 * @LastEditors: rendc
 * @LastEditTime: 2022-09-06 09:45:17
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>BOM</title>
</head>

<body>
  <input type="button" value="跳转到百度" onclick="toBaidu()">
</body>
<script>
  function toBaidu() {
    window.location.href = "https://baidu.com"
  }
  // alert("hello,world")
  // 在新窗口中打开指定地址
  // window.open("https://baidu.com")
  // window.close();
  // console.log(window.location);
  console.log(window);
  // 控制页面跳转
</script>

</html>